#!/usr/bin/env bash
app_name='ble-gateway'
docker stop ${app_name}
echo '----stop container----'
docker rm ${app_name}
echo '----rm container----'
docker rmi `docker images | grep none | awk '{print $3}'`
echo '----rm none images----'
docker run -p 8000:8000 --name ${app_name} \
--restart=always \
-e TZ="Asia/Shanghai" \
-v /etc/localtime:/etc/localtime \
-v /home/ble/logs/${app_name}/:/var/logs \
-d ble/${app_name}:1.0.0
echo '----start container----'